package com.qzsoft.zhjd.asphalt.modules.asphaltdataratio.service.impl;

import java.util.List;
import java.util.Map;

import com.qzsoft.zhjd.asphalt.modules.asphaltdataratio.dto.AsphaltDataRatioDto;
import com.qzsoft.zhjd.asphalt.modules.asphaltdataratio.entity.AsphaltDataRatioEntity;
import com.qzsoft.zhjd.asphalt.modules.asphaltdataratio.mapper.AsphaltDataRatioMapper;
import com.qzsoft.zhjd.asphalt.modules.asphaltdataratio.service.AsphaltDataRatioService;
import com.qzsoft.zhjd.common.annotation.ZhjdDataFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qzsoft.zhjd.common.components.BaseServiceComponent;

/**
 * @ClassName AsphaltDataRatioServiceImpl
 * @Description 沥青占比业务接口实现
 * @author linhuawei
 * @since 2021-12-04
 */
@Service
public class AsphaltDataRatioServiceImpl extends ServiceImpl<AsphaltDataRatioMapper, AsphaltDataRatioEntity>
        implements AsphaltDataRatioService {

    @Autowired
    private BaseServiceComponent baseServiceComponent;

    @ZhjdDataFilter(tableAlias = "t1")
    @Override
    public IPage<AsphaltDataRatioDto> withinRatioPage(Map<String, Object> params) {
        IPage<AsphaltDataRatioDto> page = baseServiceComponent.getPage(params, AsphaltDataRatioDto.class);
        return baseMapper.withinRatioPage(page, params);
    }

    @ZhjdDataFilter(tableAlias = "t1")
    @Override
    public IPage<AsphaltDataRatioDto> outsideRatioPage(Map<String, Object> params) {
        IPage<AsphaltDataRatioDto> page = baseServiceComponent.getPage(params, AsphaltDataRatioDto.class);
        return baseMapper.outsideRatioData(page, params);
    }

    @Override
    public List<AsphaltDataRatioDto> outsideRatioList(Map<String, Object> params) {
        return baseMapper.outsideRatioData(params);
    }

}
